✅️エラーの型定義を作る (scrapbox-userscript-websocket)
2024-04-19
10:51:05 UpdateChangeの型定義をミスっていたのを忘れてた
s/noTimestampUpdate: unknown;/noTimestampUpdate?: unknown;
2024-04-15
17:26:19 merged
2024-04-14
20:22:55 だいぶ書き出し終えた
まだpushしてない
code:json
[{"error":{"errors":{"title":{"properties":{"message":"Path title is required.","type":"required","path":"title","value":""},"kind":"required","path":"title","value":"","name":"ValidatorError","message":"Path title is required.","stack":"ValidatorError: Path title is required.\n at validate (/app/node_modules/mongoose/lib/schematype.js:1270:13)\n at /app/node_modules/mongoose/lib/schematype.js:1253:7\n at Array.forEach (<anonymous>)\n at SchemaString.SchemaType.doValidate (/app/node_modules/mongoose/lib/schematype.js:1198:14)\n at /app/node_modules/mongoose/lib/document.js:2567:18\n at processTicksAndRejections (node:internal/process/task_queues:78:11)"},"titleLc":{"properties":{"message":"Path titleLc is required.","type":"required","path":"titleLc","value":""},"kind":"required","path":"titleLc","value":"","name":"ValidatorError","message":"Path titleLc is required.","stack":"ValidatorError: Path titleLc is required.\n at validate (/app/node_modules/mongoose/lib/schematype.js:1270:13)\n at /app/node_modules/mongoose/lib/schematype.js:1253:7\n at Array.forEach (<anonymous>)\n at SchemaString.SchemaType.doValidate (/app/node_modules/mongoose/lib/schematype.js:1198:14)\n at /app/node_modules/mongoose/lib/document.js:2567:18\n at processTicksAndRejections (node:internal/process/task_queues:78:11)"}},"_message":"page validation failed","name":"ValidationError","message":"page validation failed: title: Path title is required., titleLc: Path titleLc is required."}}]
code:json
[{"error":{"stringValue":"\"\"","kind":"ObjectId","value":"","path":"commitId","reason":{"name":"Error","message":"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters","stack":"Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters\n at new ObjectID (/app/node_modules/bson/lib/bson/objectid.js:59:11)\n at castObjectId (/app/node_modules/mongoose/lib/cast/objectid.js:25:12)\n at ObjectId.cast (/app/node_modules/mongoose/lib/schema/objectid.js:246:12)\n at ObjectId.SchemaType.applySetters (/app/node_modules/mongoose/lib/schematype.js:1123:12)\n at ObjectId.SchemaType._castForQuery (/app/node_modules/mongoose/lib/schematype.js:1601:15)\n at ObjectId.SchemaType.castForQuery (/app/node_modules/mongoose/lib/schematype.js:1591:15)\n at ObjectId.SchemaType.castForQueryWrapper (/app/node_modules/mongoose/lib/schematype.js:1568:20)\n at cast (/app/node_modules/mongoose/lib/cast.js:332:32)\n at model.Query.Query.cast (/app/node_modules/mongoose/lib/query.js:4937:12)\n at model.Query.Query._castConditions (/app/node_modules/mongoose/lib/query.js:1975:10)\n at model.Query._updateThunk (/app/node_modules/mongoose/lib/query.js:3847:8)\n at model.Query.<anonymous> (/app/node_modules/mongoose/lib/query.js:3979:23)\n at model.Query._wrappedThunk as _updateOne (/app/node_modules/mongoose/lib/helpers/query/wrapThunk.js:16:8)\n at /app/node_modules/kareem/index.js:370:33\n at processTicksAndRejections (node:internal/process/task_queues:78:11)"},"valueType":"string","name":"CastError","message":"Cast to ObjectId failed for value \"\" (type string) at path \"commitId\" for model \"page\""}}]